<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <input type="submit" value="点击"  id="deal_click" id="deal_dblclick">
    <script>
    var click_store // 定义一个全局变量存储单击触发事件

    document.addEventListener('click', deal_click);
    document.addEventListener('dblclick', deal_dblclick);
    
    function deal_click(e){
    
        click_store = setTimeout(function(e){
            alert('单击事件')
        },300);
    }
    
    function deal_dblclick(e){
        clearTimeout(click_store);
        alert('双击事件')        
    }
</script>
    
</body>
</html>